;; This is an operating system configuration generated
;; by the graphical installer.

(use-modules (gnu))
(use-service-modules desktop networking ssh xorg)

(operating-system
  ;(services (modify-services %desktop-services
  ;            (guix-service-type
  ;             config => (guix-configuration
  ;                        (inherit config)
  ;                        (substitute-urls '("https://mirror.sjtu.edu.cn/guix"
  ;                                           "https://ci.guix.gnu.org"))))))
  (services
    ;; Assume we're starting from '%desktop-services'.  Replace it
    ;; with the list of services you're actually using.
    (modify-services %desktop-services
      (guix-service-type config =>
                        (guix-configuration
                          (inherit config)
                          (substitute-urls
                            (append (list "https://mirror.sjtu.edu.cn/guix")
                                    %default-substitute-urls))
                          (authorized-keys
                            (append (list (local-file "./key.pub"))
                                    %default-authorized-guix-keys)))))))

  (locale "en_US.utf8")
  (timezone "Asia/Shanghai")
  (keyboard-layout (keyboard-layout "us"))
  (host-name "Guix")
  (users (cons* (user-account
                  (name "damon")
                  (comment "DamonKwok")
                  (group "users")
                  (home-directory "/home/damon")
                  (supplementary-groups
                    '("wheel" "netdev" "audio" "video")))
                %base-user-accounts))
  (packages
    (append
      (list (specification->package "i3-wm")
            (specification->package "i3status")
            (specification->package "dmenu")
            (specification->package "st")
            (specification->package "emacs")
            (specification->package "emacs-exwm")
            (specification->package
              "emacs-desktop-environment")
            (specification->package "nss-certs"))
      %base-packages))
  (services
    (append
      (list (service openssh-service-type)
            (set-xorg-configuration
              (xorg-configuration
                (keyboard-layout keyboard-layout))))
      %desktop-services))
  (bootloader
    (bootloader-configuration
      (bootloader grub-bootloader)
      (target "/dev/sda")
      (keyboard-layout keyboard-layout)))
  (swap-devices
    (list (uuid "7876b0be-ece2-4fe6-bac0-7f8e478310f6")))
  (file-systems
    (cons* (file-system
             (mount-point "/")
             (device
               (uuid "12a4a11a-7ec6-4197-b53f-c201a8deaa43"
                     'ext4))
             (type "ext4"))
           %base-file-systems)))
